<template>
  <div class="band-dashboard">
    <!-- 侧边栏 -->
    <div class="sidebar">
      <div class="logo">
        <h2>乐队管理系统</h2>
      </div>
      <nav class="nav-menu">
        <router-link to="/band/info" class="nav-item">
          <i class="fas fa-info-circle"></i>
          乐队信息
        </router-link>
        <router-link to="/band/member" class="nav-item">
          <i class="fas fa-users"></i>
          成员信息
        </router-link>
        <router-link to="/band/music" class="nav-item">
          <i class="fas fa-music"></i>
          歌曲信息
        </router-link>
        <router-link to="/band/concert" class="nav-item">
          <i class="fas fa-microphone-alt"></i>
          演唱会信息
        </router-link>
        <router-link to="/band/album" class="nav-item">
          <i class="fas fa-compact-disc"></i>
          粉丝信息
        </router-link>
        <router-link to="/band/evaluation" class="nav-item">
          <i class="fas fa-star"></i>
          评论信息
        </router-link>
      </nav>
    </div>

    <!-- 主内容区 -->
    <div class="main-content">
      <header class="top-bar">
        <div class="breadcrumb">
          {{ currentPath }}
        </div>
        <div class="user-info">
          <span>乐队用户</span>
          <button @click="logout" class="logout-btn">退出</button>
        </div>
      </header>
      <div class="content-area">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'BandDashboard',
  computed: {
    currentPath() {
      const pathMap = {
        'info': '乐队信息',
        'member': '成员信息',
        'music': '歌曲信息',
        'concert': '演唱会信息',
        'album': '粉丝信息',
        'evaluation': '评论信息'
      }
      const path = this.$route.path.split('/').pop()
      return pathMap[path] || '仪表盘'
    }
  },
  methods: {
    logout() {
      this.$router.push('/login')
    }
  }
}
</script>

<style scoped>
.band-dashboard {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #1c2833 0%, #2c3e50 100%);
}

.sidebar {
  width: 250px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 20px;
  color: white;
}

.logo {
  padding: 20px 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu {
  margin-top: 30px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 15px;
  color: white;
  text-decoration: none;
  margin-bottom: 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-item.router-link-active {
  background: linear-gradient(45deg, #2c5364, #203a43);
}

.nav-item i {
  margin-right: 10px;
}

.main-content {
  flex: 1;
  padding: 20px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 20px;
}

.content-area {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  min-height: calc(100vh - 140px);
}

.logout-btn {
  padding: 8px 16px;
  background: linear-gradient(45deg, #2c5364, #203a43);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
</style> 